# -*- coding: utf-8 -*-
import os.path
import sys
import re
import os


f = open(sys.argv[1])
temp = None
files = []
while 1:
  line = f.readline()
  if not line:
     break
    
  files.append(re.sub("\n","", line));


for el in files:
  if el.find("-")>0:
    n = int(el[el.find(".")+1:el.find("-")]) 
  else:
    n = int(el[el.find(".")+1:el.find("+")])
  print el
  os.system("./negseq " + "Inst/"+ el + " " + str(n))
  print "./negseq " + "Inst/"+ el + " " + str(n)
  print ""
